/*
 * @Author: moeWang
 * @Date: 2022-03-09 14:35:18
 * @LastEditTime: 2022-07-15 14:19:33
 * @LastEditors: moeWang
 * @Description:
 * @FilePath: \nest-web\src\logical\org\org.module.ts
 */

import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { SequelizeModule } from '@nestjs/sequelize';
import { DatabaseModule } from 'src/database/database.module';
import { RpAccount } from '../account/entity/account.entity';
import { AccountService } from '../account/service/account.service';
import { jwtConstants } from '../auth/constants';
import { AuthService } from '../auth/service/auth.service';
import { LoginLogService } from '../login-log/service/login-log.service';
import { OrgController } from './controller/org.controller';
import { RpOrgEntity } from './entity/org.entity';
import { OrgProviders } from './provider/org.providers';
import { OrgService } from './service/org.service';

@Module({
  controllers: [OrgController],
  imports: [
    DatabaseModule,
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions: { expiresIn: jwtConstants.expiresSecond }, // token 过期时效
    }),
    SequelizeModule.forFeature([RpOrgEntity]),
  ],
  providers: [OrgService, ...OrgProviders],
})
export class OrgModule {}
